<template>
  <div class="tabbar-container">
    <!-- 组件缓存 -->
    <keep-alive>
      <!-- 路由占位符 -->
      <router-view></router-view>
    </keep-alive>

    <van-tabbar route>
      <van-tabbar-item to="/">
        <span class="text">首页</span>
        <i slot="icon" class="toutiao toutiao-shouye"></i>
      </van-tabbar-item>
      <van-tabbar-item to="/my">
        <span class="text">{{ this.$store.state.user ? '我的' : '未登录' }}</span>
        <i slot="icon" class="toutiao toutiao-wode"></i>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Tabbar'
}
</script>

<style lang="less" scoped>
.tabbar-container {
  .toutiao {
    font-size: 38px;
  }
  .text {
    font-size: 22px;
  }
}
</style>
